<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>求位数</title>
	</head>
	<body>
		<script>
			var num=prompt("请输入一整数：");	
			if(Boolean(num)){
				if(!isNaN(num)){
					alert("您输入的是"+num.length+"位数");
				}else{
					alert("输入不合法");
				}
			}else{
				alert("没有任何输入");
			}	
		
		</script>
	</body>
</html>
